// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::Recommender].
#[async_trait::async_trait]
pub trait Recommender: std::fmt::Debug + Send + Sync {
    async fn list_insights(
        &self,
        req: crate::model::ListInsightsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListInsightsResponse>>;

    async fn get_insight(
        &self,
        req: crate::model::GetInsightRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Insight>>;

    async fn mark_insight_accepted(
        &self,
        req: crate::model::MarkInsightAcceptedRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Insight>>;

    async fn list_recommendations(
        &self,
        req: crate::model::ListRecommendationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListRecommendationsResponse>>;

    async fn get_recommendation(
        &self,
        req: crate::model::GetRecommendationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Recommendation>>;

    async fn mark_recommendation_dismissed(
        &self,
        req: crate::model::MarkRecommendationDismissedRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Recommendation>>;

    async fn mark_recommendation_claimed(
        &self,
        req: crate::model::MarkRecommendationClaimedRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Recommendation>>;

    async fn mark_recommendation_succeeded(
        &self,
        req: crate::model::MarkRecommendationSucceededRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Recommendation>>;

    async fn mark_recommendation_failed(
        &self,
        req: crate::model::MarkRecommendationFailedRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Recommendation>>;

    async fn get_recommender_config(
        &self,
        req: crate::model::GetRecommenderConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::RecommenderConfig>>;

    async fn update_recommender_config(
        &self,
        req: crate::model::UpdateRecommenderConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::RecommenderConfig>>;

    async fn get_insight_type_config(
        &self,
        req: crate::model::GetInsightTypeConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::InsightTypeConfig>>;

    async fn update_insight_type_config(
        &self,
        req: crate::model::UpdateInsightTypeConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::InsightTypeConfig>>;
}

/// All implementations of [super::Recommender] also implement [Recommender].
#[async_trait::async_trait]
impl<T: super::Recommender> Recommender for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn list_insights(
        &self,
        req: crate::model::ListInsightsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListInsightsResponse>> {
        T::list_insights(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_insight(
        &self,
        req: crate::model::GetInsightRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Insight>> {
        T::get_insight(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn mark_insight_accepted(
        &self,
        req: crate::model::MarkInsightAcceptedRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Insight>> {
        T::mark_insight_accepted(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_recommendations(
        &self,
        req: crate::model::ListRecommendationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListRecommendationsResponse>> {
        T::list_recommendations(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_recommendation(
        &self,
        req: crate::model::GetRecommendationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Recommendation>> {
        T::get_recommendation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn mark_recommendation_dismissed(
        &self,
        req: crate::model::MarkRecommendationDismissedRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Recommendation>> {
        T::mark_recommendation_dismissed(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn mark_recommendation_claimed(
        &self,
        req: crate::model::MarkRecommendationClaimedRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Recommendation>> {
        T::mark_recommendation_claimed(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn mark_recommendation_succeeded(
        &self,
        req: crate::model::MarkRecommendationSucceededRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Recommendation>> {
        T::mark_recommendation_succeeded(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn mark_recommendation_failed(
        &self,
        req: crate::model::MarkRecommendationFailedRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Recommendation>> {
        T::mark_recommendation_failed(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_recommender_config(
        &self,
        req: crate::model::GetRecommenderConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::RecommenderConfig>> {
        T::get_recommender_config(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_recommender_config(
        &self,
        req: crate::model::UpdateRecommenderConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::RecommenderConfig>> {
        T::update_recommender_config(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_insight_type_config(
        &self,
        req: crate::model::GetInsightTypeConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::InsightTypeConfig>> {
        T::get_insight_type_config(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_insight_type_config(
        &self,
        req: crate::model::UpdateInsightTypeConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::InsightTypeConfig>> {
        T::update_insight_type_config(self, req, options).await
    }
}
